import { Injectable } from '@angular/core';
import { ServicesModule } from './services.module';
import { HashMap } from './dataType/HashMap';

@Injectable({
  providedIn: ServicesModule
})
export class ResourceENService {

  private jsonStr: string;
  private resourceMap: any;
  private jsonObj: any
  constructor() {
    this.jsonStr = '{"cellsSearchTitle":"Search Text in Microsoft Excel &amp; OpenOffice Calc Files","cellsSearchTitleSub":"Upload the spreadsheet and specify the text you want to search. App will return a file with results as soon as the processing is done."}'
    this.jsonObj = {
      "AsposeProductFamilyInclude": "Cross Platform Apps Include",
      "AsposeCells": "Aspose.Cells",
      "SearchAPPName": "Search",
      "CellsSearchDesc": "Search text in your Excel document",
      "cellsSearchTitle": "Search Text in Microsoft Excel &amp; OpenOffice Calc Files",
      "cellsSearchTitleSub": "Upload the spreadsheet and specify the text you want to search. App will return a file with results as soon as the processing is done.",
      "CellsPageMainTitle": "Free Web Apps for 3D Files Processing",
      "CellsPageSubHeading": "Apps that can load & process Autodesk, Wavefront, 3D Studio and Draco file formats from platform.",
      "CellsSearchValidationExpression": ".xls,.xlsx,.xlsm,.xlsb,.ods,.csv,.txt,.tsv",
      "CellsSearchLiFeature": "Instantly download or send output file as an email",
      "ConversionAPPName": "Conversion",
      "CellsConversionDesc": "Convert your Excel worksheets to PDF, HTML and other formats from any OS and browser",
      "ViewerAPPName": "Viewer",
      "CellsViewerDesc": "View your Spreadsheets online from anywhere",
      "Supported": "Supported",
      "Documents": "Documents",
      "PoweredBy": "Powered by",
      "InvalidFileExtension": "Invalid file, please upload a file with extension",
      "SearchFeature1": "Fast and Easy Search",
      "SearchFeature1Description": "Upload your document and click on “SEARCH NOW” button. You will get the file with search results as soon as the operation is performed",
      "SearchFeature2": "Search from Anywhere",
      "SearchFeature2Description": "It works from all platforms including Windows, Mac, Android and iOS. All files are processed on our servers. No plugin or software installation required for you",
      "SearchFeature3": "Search Quality",
      "QualityDescMetadata": "All files are processed using Aspose APIs, which are being used by many Fortune 100 companies across 114 countries",
      "FileSelectMessage": "Please select a file to upload",
      "RedactionSearchErrorMessage": "Search query can't be empty",
      "RedactionSearchPlaceholder": "Type text or regular expression",

      "Threedsave": "Model Repairing",
      "Threedrepair": "repair",
      "AsposeThreed": "Aspose.3D ",
      "ThreedTitle": "Free online app for 3D files repairing",
      "ThreedTitleSub": "Repair your source 3D files for printing.",
      "ThreedsaveValidationExpression": ".fbx,.ase,.dae,.dxf,.jt,.pdf,.att,.obj,.u3d,.stl,.rvm,.amf,.gltf,.glb,.3ds,.drc,.ply,.3mf,.bin,.x,.wrl,.zip,.usdz,.usdc",
      "saveAPPName": "Model Repairing",
      "ThreedsaveLiFeature": "Support various 3D formats. ",
      "ThreedsaveLiFeature2": "Automatically detect model errors. ",
      "ThreedsaveLiFeature3": "One click to fix all errors. ",
      "ThreedsaveLiFeature4": "Save as AMF, OBJ, STL for printing.",
      "ThreedRepairingSaveAsExtensions": "STL,AMF,OBJ",
      "ThreedconversionLiFeature": "Supported Documents: FBX, STL, OBJ, 3DS, GLTF, DRC, RVM, PDF, X, JT, DXF, PLY, 3MF, ASE, AMF, DAE, U3D, VRML, GLB",
      "ThreedconversionLiFeature2": "Save as: FBX, OBJ, 3DS, DRC, AMF, RVM, DAE, GLTF, GLB, PDF, HTML, PLY, STL, U3D ",
      "ThreedconversionValidationExpression": "",
      "conversionAPPName": "Conversion",
      "ThreedConversionSaveAsExtensions": "FBX,OBJ,3DS,DRC,AMF,RVM,DAE,GLTF,GLB,PDF,HTML,PLY,STL,U3D",
      "threedConversionTitle": "Free Converter App for 3D File Formats",
      "threedConversionTitleSub": "Convert 3D File to Autodesk, Draco, Wavefront, 3D Studio and many other formats.",
      "ThreedFBXValidationExpression": ".fbx",
      "ThreedSTLValidationExpression": ".stl",
      "ThreedOBJValidationExpression": ".obj",
      "Threed3DSValidationExpression": ".3ds",
      "ThreedGLTFValidationExpression": ".gltf",
      "ThreedDRCValidationExpression": ".drc",
      "ThreedRVMValidationExpression": ".rvm",
      "ThreedPDFValidationExpression": ".pdf",
      "ThreedXValidationExpression": ".x",
      "ThreedJTValidationExpression": ".jt",
      "ThreedDXFValidationExpression": ".dxf",
      "ThreedPLYValidationExpression": ".ply",
      "Threed3MFValidationExpression": ".3mf",
      "ThreedASEValidationExpression": ".ase",
      "ThreedDAEValidationExpression": ".dae",
      "ThreedU3DValidationExpression": ".u3d",
      "ThreedVRMLValidationExpression": ".vrml",
      "ThreedGLBValidationExpression": ".glb",
      "ThreedAMFValidationExpression": ".amf",
      "ThreedFBXTitle": "Filmbox Interchange File",
      "ThreedFBXContent": "FBX, FilmBox, is a popular 3D file format that was originally developed by Kaydara for MotionBuilder. It was acquired by Autodesk Inc in 2006 and is now one of the main 3D exchange formats as used by many 3D tools. FBX is available in both binary and ASCII file format. The format was established to provided interoperability between digital content creation applications.",
      "ThreedSTLTitle": "Stereolithography",
      "ThreedSTLContent": "STL, abbreviation for stereolithrography, is an interchangeable file format that represents 3-dimensional surface geometry. The file format finds its usage in several fields such as rapid prototyping, 3D printing and computer-aided manufacturing. It represents a surface as a series of small triangles, known as facets, where each facet is described by a perpendicular direction and three points representing the vertices of the triangle.",
      "ThreedOBJTitle": "Geometry Definition File Format",
      "ThreedOBJContent": "OBJ files are used by Wavefront's Advanced Visualizer application to define and store the geometric objects. Backward and forward transmission of geometric data is made possible through OBJ files. Both polygonal geometry like points, lines, texture vertices, faces and free-form geometry (curves and surfaces) are supported by OBJ format. This format does not support animation or information related to light and position of scenes.",
      "Threed3DSTitle": "3D Studio Mesh File Format",
      "Threed3DSContent": "A file with 3DS extension represents 3D Sudio (DOS) mesh file format used by Autodesk 3D Studio. Autodesk 3D Studio has been in 3D file format market since 1990s and has now evolved to 3D Studio MAX for working with 3D modeling, animation and rendering. A 3DS file contains data for 3D representation of scenes and images and is one of the popular file formats for 3D data import and export.",
      "ThreedGLTFTitle": "GL Transmisison Format",
      "ThreedGLTFContent": "glTF (GL Transmission Format) is a 3D file format that stores 3D model information in JSON format. The use of JSON minimizes both the size of 3D assets and the runtime processing needed to unpack and use those assets. It was adopted for the efficient transmission and loading of 3D scenes and models by applications.",
      "ThreedDRCTitle": "DRM Rights Object",
      "ThreedDRCContent": "DRC FIle Extension and associated file format.",
      "ThreedRVMTitle": "Revenant Archive",
      "ThreedRVMContent": "RVM data files are related to AVEVA PDMS. RVM file is an AVEVA Plant Design Management System Model. AVEVA's Plant Design Management System (PDMS) is the most popular 3D design system using data-centric technology for managing projects.",
      "ThreedPDFTitle": "Portable Document",
      "ThreedPDFContent": "Portable Document Format (PDF) is a type of document created by Adobe back in 1990s. The purpose of this file format was to introduce a standard for representation of documents and other reference material in a format that is independent of application software, hardware as well as Operating System. PDF files can be opened in Adobe Acrobat Reader/Writer as well in most modern browsers like Chrome, Safari, Firefox via extensions/plug-ins.",
      "ThreedXTitle": "DirectX Model File",
      "ThreedXContent": "X is a DirectX Model image file used by DirectX technology which is for 3D graphics rendering in games. The file format specifies 3D object structures for meshes, textures, animations, and objects.",
      "ThreedJTTitle": "Open CAD file",
      "ThreedJTContent": "JT (Jupiter Tessellation) is an efficient, industry-focused and flexible ISO-standardized 3D data format developed by Siemens PLM Software. Mechanical CAD domains of Aerospace, automotive industry, and Heavy Equipment use JT as their most leading 3D visualization format.",
      "ThreedDXFTitle": "Autodesk Drawing Exchange File Format",
      "ThreedDXFContent": "DXF, Drawing Interchange Format, or Drawing Exchange Format, is a tagged data representation of AutoCAD drawing file. Each element in the file has a prefix integer number called a group code. This group code actually represents the element that follows and indicates the meaning of a data element for a given object type. DXF makes it possible to represent almost all user-specified information in a drawing file.",
      "ThreedPLYTitle": "Polygon File Format",
      "ThreedPLYContent": "PLY, Polygon File Format, represents 3D file format that stores graphical objects described as a collection of polygons. The purpose of this file format was to establish a simple and easy file type that is general enough to be useful for a wide range of models. PLY file format comes as ASCII as well as Binary format for compact storage and for rapid saving and loading.",
      "Threed3MFTitle": "3D Manufacturing File Format",
      "Threed3MFContent": "3MF, 3D Manufacturing Format, is used by applications to render 3D object models to a variety of other applications, platforms, services and printers. It was built to avoid the limitations and issues in other 3D file formats, like STL, for working with the latest versions of 3D printers. 3MF is relatively a new file format that has been developed and published by the 3MF consortium.",
      "ThreedASETitle": "Aseprite Sprite File",
      "ThreedASEContent": "An ASE file is a 2D animation or graphics that contain layers, frames, palettes, tags, and settings.",
      "ThreedDAETitle": "Digital Asset Exchange File Format",
      "ThreedDAEContent": "A DAE file is a Digital Asset Exchange file format that is used for exchanging data between interactive 3D applications. This file format is based on the COLLADA (COLLAborative Design Activity) XML schema which is an open standard XML schema for the exchange of digital assets among graphics software applications. It has been adopted by ISO as a publicly available specification, ISO/pAS 17506.",
      "ThreedU3DTitle": "Universal 3D File Format",
      "ThreedU3DContent": "U3D (Universal 3D) is a compressed file format and data structure for 3D computer graphics. It contains 3D model information such as triangle meshes, lighting, shading, motion data, lines and points with color and structure. The format was accepted as ECMA-363 standard in August 2005. 3D PDF documents support U3D objects embedding and can be viewed in Adobe Reader (version 7 and onwards).",
      "ThreedVRMLTitle": "Virtual Reality Modeling Language",
      "ThreedVRMLContent": "The Virtual Reality Modeling Language (VRML) is a file format for representation of interactive 3D world objects over the World Wide Web (www). It finds its usage in creating three-dimensional representations of complex scenes such as illustrations, definition and virtual reality presentations. The format has been superseded by X3D. Many 3D modelling applications can save objects and scenes in VRML format.",
      "ThreedGLBTitle": "Binary File Format",
      "ThreedGLBContent": "GLB is the binary file format representation of 3D models saved in the GL Transmission Format (glTF). Information about 3D models such as node hierarchy, cameras, materials, animations and meshes in binary format. This binary format stores the glTF asset (JSON, .bin and images) in a binary blob. It also avoids the issue of increase in file size which happens in case of glTF. GLB file format results in compact file sizes, fast loading, complete 3D scene representation, and extensibility for further development. The format uses model/gltf-binary as MIME type.",
      "ThreedAMFTitle": "Additive Manufacturing File",
      "ThreedAMFContent": "Additive Manufacturing file format (AMF) defines open standards for objects description in order to be utilized by additive manufacturing processes such as 3D Printing. CAD programs use the AMF file format by making use of the information such as geometry, color and material of the objects. AMF is different than STL format as the lateral does not support color, materials, lattices, and constellations.",
      "ThreedHTMLTitle": "Hyper Text Markup Language",
      "ThreedHTMLContent": "HTML (Hyper Text Markup Language) is the extension for web pages created for display in browsers. Known as language of the web, HTML has evolved with requirements of new information requirements to be displayed as part of web pages. The latest variant is known as HTML 5 that gives a lot of flexibility for working with the language. HTML pages are either received from server, where these are hosted, or can be loaded from local system as well.",
      "ThreedFBXLink": "3DS,AMF,DAE,DRC,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedSTLLink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,U3D",
      "ThreedOBJLink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,PDF,PLY,RVM,STL,U3D",
      "Threed3DSLink": "AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedGLTFLink": "3DS,AMF,DAE,DRC,FBX,GLB,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedDRCLink": "3DS,AMF,DAE,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedRVMLink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,STL,U3D",
      "ThreedPDFLink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PLY,RVM,STL,U3D",
      "ThreedXLink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedJTLink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedDXFLink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedPLYLink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,RVM,STL,U3D",
      "Threed3MFLink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedASELink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedDAELink": "3DS,AMF,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedU3DLink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL",
      "ThreedVRMLLink": "3DS,AMF,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedGLBLink": "3DS,AMF,DAE,DRC,FBX,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedAMFLink": "3DS,DAE,DRC,FBX,GLB,GLTF,HTML,OBJ,PDF,PLY,RVM,STL,U3D",
      "ThreedFBXDescribe": "Filmbox Interchange File",
      "ThreedSTLDescribe": "Stereolithography",
      "ThreedOBJDescribe": "Geometry Definition File Format",
      "Threed3DSDescribe": "3D Studio Mesh File Format",
      "ThreedGLTFDescribe": "GL Transmisison Format",
      "ThreedDRCDescribe": "DRM Rights Object",
      "ThreedRVMDescribe": "Revenant Archive",
      "ThreedPDFDescribe": "Portable Document",
      "ThreedPLYDescribe": "Polygon File Format",
      "ThreedDAEDescribe": "Digital Asset Exchange File Format",
      "ThreedU3DDescribe": "Universal 3D File Format",
      "ThreedGLBDescribe": "Binary File Format",
      "ThreedAMFDescribe": "Additive Manufacturing File",
      "ThreedHTMLDescribe": "Hyper Text Markup Language",
      "ThreedFBXHref": "3d",
      "ThreedSTLHref": "cad",
      "ThreedOBJHref": "3d",
      "Threed3DSHref": "3d",
      "ThreedGLTFHref": "3d",
      "ThreedDRCHref": "3d",
      "ThreedRVMHref": "3d",
      "ThreedPDFHref": "",
      "ThreedXHref": "3d",
      "ThreedJTHref": "3d",
      "ThreedDXFHref": "cad",
      "ThreedPLYHref": "3d",
      "Threed3MFHref": "3d",
      "ThreedASEHref": "3d",
      "ThreedDAEHref": "3d",
      "ThreedU3DHref": "3d",
      "ThreedVRMLHref": "3d",
      "ThreedGLBHref": "3d",
      "ThreedAMFHref": "3d",
      "ThreedHTMLHref": "web",
      "threedViewerTitle": "Free online app for 3D files viewer",
      "threedViewerTitleSub": "Viewing 3D files from any device.",
      "viewerAPPName": "Viewer",
      "ThreedviewerLiFeature": "Supported Documents: FBX, STL, OBJ, 3DS, GLTF, DRC, RVM, PDF, X, JT, DXF, PLY, 3MF, ASE, AMF, DAE, U3D, VRML, GLB, ZIP. ",
      "ThreedviewerLiFeature2": "View your 3D file without installing any softwares.",
      "ThreedviewerValidationExpression": ".fbx,.ase,.dae,.dxf,.jt,.pdf,.att,.obj,.u3d,.stl,.rvm,.amf,.gltf,.glb,.3ds,.drc,.ply,.3mf,.bin,.x,.wrl,.zip,.usdz,.usdc",
      "ThreedFreeOnline": "Free online ",
      "ThreedrepairingPrinting": " Files repairing for 3D Printing",
      "ThreedRepairSource": "Repair your source ",
      "ThreedFilesPrinting": " files for printing.",
      "ThreedEmptyMsgGltf": "Please upload gltf type 3D file.",
      "ThreedEmptyMsgDependent": "Please add dependent files.",
      "ThreedEmptyMsgCatch": "File upload error",
      "ThreedConversionTo": " to ",
      "ThreedConversionConverter": " Converter",
      "ThreedConversionConvert": "Convert ",
      "ThreedConversionModernBrowser": " online from any device, with a modern browser like Chrome, Firefox.",
      "ThreedConvertMsg1": "Error: The parameter 'addresses' cannot be an empty string. Parameter name: addresses",
      "ThreedConvertMsg2": "Error: The specified string is not in the form required for an e-mail address.",
      "ThreedConvertMsg3": "Your file has been converted successfully, please check your email to download the converted file",
      "ThreedConvertMsg4": "Error:Your file has been send Fail,Please try again later",
      "ThreedViewerPrinting": " Files viewer for 3D Printing",
      "ThreedViewerViewing": "Viewing ",
      "ThreedViewerDevice": " files from any device.",
      "ThreedUploadObj": "You can also package the .mtl file together with the .obj into a zip file for uploading.",
      "ThreedUploadOnlySupport": "We only support convert file less than 100MB.",
      "measurementAPPName": "Measurement",
      "ThreedMeasurementPrinting": " Files measurement for 3D Printing",
      "ThreedmeasurementLiFeature": "Supported Documents: FBX, STL, OBJ, 3DS, GLTF, DRC, RVM, PDF, X, JT, DXF, PLY, 3MF, ASE, AMF, DAE, U3D, VRML, GLB, ZIP. ",
      "ThreedmeasurementLiFeature2": "Measurement your 3D file without installing any softwares.",
      "ThreedmeasurementValidationExpression": ".fbx,.ase,.dae,.dxf,.jt,.pdf,.att,.obj,.u3d,.stl,.rvm,.amf,.gltf,.glb,.3ds,.drc,.ply,.3mf,.bin,.x,.wrl,.zip,.usdz,.usdc",
      "ThreedMeasurementViewing": "Measurement ",
      "threedMeasurementTitle": "Free online app for 3D files measurement",
      "threedMeasurementTitleSub": "Measurement 3D files from any device."
    };
    this.resourceMap = this.JsonObjToMap(this.jsonObj);
  }

  public get(key: string) {
    return this.resourceMap.get(key);
  }

  JsonStrToMap(jsonStr: string) {
    let jsonObj = JSON.parse(this.jsonStr);
    let map = new Map();
    for (let i in jsonObj) {
      map.set(i, jsonObj[i]);
    }
    return map;
  }
  JsonObjToMap(jsonObj: any) {
    let map = new Map();
    for (let i in jsonObj) {
      map.set(i, jsonObj[i]);
    }
    return map;
  }
}
